package com.it.controller;

import com.it.pojo.Student;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.*;

@Controller
@RequestMapping("/show")
public class TestController {
    @RequestMapping("/test")
    public String test(Model model){
        Map<String,Object> mapList = new HashMap<String, Object>();
        mapList.put("名字","三");
        mapList.put("年龄","四");
        model.addAttribute("mapList",mapList);
        model.addAttribute("date",new Date());
        return "index";
    }

}
